//
//  TicketAddMemberInfoCell.m
//  ImGuider
//
//  Created by 王鹏宇 on 2018/1/22.
//  Copyright © 2018年 imguider. All rights reserved.
//

#import "TicketAddMemberInfoCell.h"
#import "AddTicketMemberDetail.h"
@implementation TicketAddMemberInfoCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    self.nameLabel.textColor = kSubitleColor;
    self.enNameLabel.textColor = kContentColor;
}

- (void)setIsSelect:(BOOL)isSelect {
    
    _isSelect = isSelect;
    
    NSString * imageName = isSelect ? @"button_tick_sel":@"button_tick_nor";
    
    _clickedImageView.image = [UIImage imageNamed:imageName];
}


- (void)configDataWith:(TicketMemberInfoModel *)model {
    
    self.model = model;
    self.nameLabel.text = model.realname;
    self.enNameLabel.text = [NSString stringWithFormat:@"%@ / %@",model.firstname,model.lastname];
}

- (void)layoutSubviews{
    
    [super layoutSubviews];
    
    NSString * imageName = self.isSelect ? @"button_tick_sel":@"button_tick_nor";
    
    _clickedImageView.image = [UIImage imageNamed:imageName];
}
- (IBAction)goMemberDeatil:(UIButton *)sender {
    
    AddTicketMemberDetail * vc = [[AddTicketMemberDetail alloc] init];
    vc.memberModel = self.model;
    vc.mustLimitArray = [NSMutableArray arrayWithArray:self.superVC.mustLimiteArray];
    vc.delegate = self.superVC;
    [self.superVC.navigationController pushViewController:vc animated:YES];
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
